function [camA camAtWC camLookAtWC] = DrawAxesRT( strname, fignum, R,T ) 
dbstop if error 
% the matrix that transforms the 
% camera to be at pos, viewing the origin
% The T part of the matrix is just [pos]

camA = [R T; zeros(1,3) 1];
camAI = camA^-1; % reverse map

% draw a plot for debug purposes
p0 = 1 * 0.3 * norm(T);
x_ = [ [0;0;0;1] [p0;0;0;1] ];
y_ = [ [0;0;0;1] [0;p0;0;1] ];
z_ = [ [0;0;0;1] [0;0;p0;1] ];
figure(fignum);
hold on;
plot3(x_(1,:),x_(2,:),x_(3,:),'r');  hold on
plot3(y_(1,:),y_(2,:),y_(3,:),'g'); plot3(z_(1,:),z_(2,:),z_(3,:),'b');
x_c = camAI * x_; y_c = camAI * y_; z_c = camAI * z_;
text(0,0,0,'World Origin','FontSize',8);
figure(fignum); plot3(x_c(1,:),x_c(2,:),x_c(3,:),'r');  
plot3(y_c(1,:),y_c(2,:),y_c(3,:),'g'); plot3(z_c(1,:),z_c(2,:),z_c(3,:),'b');
text(x_c(1),x_c(2),x_c(3),strname,'FontSize',8);
camproj('perspective'); xlabel('x'); ylabel('y');
hold off

camAtWC = x_c(:,1); % camera location in world coordinates
camLookAtWC = z_c(:,2); % a vector the camera points at in world coords

breakhere = 1;